# eric7.Tasks.Task

Module implementing a class to store task data.

### Global Attributes

None

### Classes

Task | Class implementing the task data structure.
TaskPriority | Class defining the task priorities.
TaskType | Class defining the task types.

### Functions

None

## Task

Class implementing the task data structure.

### Derived from

QTreeWidgetItem

### Class Attributes

TaskType2ColorName
TaskType2IconName
TaskType2MarkersName

### Class Methods

None

### Methods

Task | Constructor
colorizeTask | Public slot to set the colors of the task item.
getFilename | Public method to retrieve the task's filename.
getLineno | Public method to retrieve the task's linenumber.
getParentUuid | Public method to get the parent task's uid.
getUuid | Public method to get the task's uid.
isCompleted | Public slot to return the completion status.
isFileTask | Public slot to get an indication, if this task is related to a file.
isProjectFileTask | Public slot to get an indication, if this task is related to a project file.
isProjectTask | Public slot to return the project relation status.
setCompleted | Public slot to update the completed flag.
setDescription | Public slot to update the description field.
setPriority | Public slot to update the priority.
setProjectTask | Public method to set the project relation flag.
setSummary | Public slot to update the description.
setTaskType | Public method to update the task type.
toDict | Public method to convert the task data to a dictionary.

### Static Methods

None

#### Task (Constructor)

Task(summary, priority=TaskPriority.NORMAL, filename="", lineno=0, completed=False, _time=0, isProjectTask=False, taskType=TaskType.TODO, project=None, description="", uid="", parentUid="", )

Constructor

summary (str)
  summary text of the task
priority (TaskPriority)
  priority of the task
filename (str)
  filename containing the task
lineno (int)
  line number containing the task
completed (bool)
  flag indicating completion status
_time (float)
  creation time of the task (if 0 use current time)
isProjectTask (bool)
  flag indicating a task related to the current project
taskType (TaskType)
  type of the task
project (Project)
  reference to the project object
description (str)
  explanatory text of the task
uid (str)
  unique id of the task
parentUid (str)
  unique id of the parent task

#### Task.colorizeTask

colorizeTask()

Public slot to set the colors of the task item.

#### Task.getFilename

getFilename()

Public method to retrieve the task's filename.

Return:
  filename

Return Type:
  str

#### Task.getLineno

getLineno()

Public method to retrieve the task's linenumber.

Return:
  linenumber

Return Type:
  int

#### Task.getParentUuid

getParentUuid()

Public method to get the parent task's uid.

Return:
  parent uid

Return Type:
  str

#### Task.getUuid

getUuid()

Public method to get the task's uid.

Return:
  uid

Return Type:
  str

#### Task.isCompleted

isCompleted()

Public slot to return the completion status.

Return:
  flag indicating the completion status

Return Type:
  bool

#### Task.isFileTask

isFileTask()

Public slot to get an indication, if this task is related to a file.

Return:
  flag indicating a file task

Return Type:
  bool

#### Task.isProjectFileTask

isProjectFileTask()

Public slot to get an indication, if this task is related to a project file.

Return:
  flag indicating a project file task

Return Type:
  bool

#### Task.isProjectTask

isProjectTask()

Public slot to return the project relation status.

Return:
  flag indicating the project relation status

Return Type:
  bool

#### Task.setCompleted

setCompleted(completed)

Public slot to update the completed flag.

completed (bool)
  flag indicating completion status

#### Task.setDescription

setDescription(description)

Public slot to update the description field.

description (str)
  descriptive text of the task

#### Task.setPriority

setPriority(priority)

Public slot to update the priority.

priority (TaskPriority)
  priority of the task

#### Task.setProjectTask

setProjectTask(pt)

Public method to set the project relation flag.

pt (bool)
  flag indicating a project task

#### Task.setSummary

setSummary(summary)

Public slot to update the description.

summary (str)
  summary text of the task

#### Task.setTaskType

setTaskType(taskType)

Public method to update the task type.

taskType (TaskType)
  type of the task

#### Task.toDict

toDict()

Public method to convert the task data to a dictionary.

Return:
  dictionary containing the task data

Return Type:
  dict

Up

## TaskPriority

Class defining the task priorities.

### Derived from

enum.IntEnum

### Class Attributes

HIGH
LOW
NORMAL

### Class Methods

None

### Methods

None

### Static Methods

None

Up

## TaskType

Class defining the task types.

### Derived from

enum.IntEnum

### Class Attributes

DOCU
FIXME
NONE
NOTE
TEST
TODO
WARNING

### Class Methods

None

### Methods

None

### Static Methods

None

Up